package com.clss.uvctest;

import java.util.Map;

import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.Field;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.Header;
import retrofit2.http.Headers;
import retrofit2.http.POST;
import retrofit2.http.Query;

/**
 * Created by liuv on 2018/3/26.
 */

public interface ApiList {

    @POST("alarm/client/appCall/addVideoCase")
    @FormUrlEncoded
    Call<BaseJson> addVideoCase(@Header(Constant.APP_TOKEN) String token, @FieldMap Map<String, String> body);

    @POST("api/createVideoRoom")
    @FormUrlEncoded
    Call<BaseJson> createVideoRoom(@Header(Constant.APP_TOKEN) String token, @FieldMap Map<String, String> body);

    @POST("api/login")
    @FormUrlEncoded
    Call<BaseJson> login(@FieldMap Map<String, String> body);

    @POST("api/police/login")
    @FormUrlEncoded
    Call<BaseJson> policeLogin(@FieldMap Map<String, String> body);

    @POST("web/infoTask/joinVideoRoom")
    @FormUrlEncoded
    Call<BaseJson> joinVideoRoom(@Header(Constant.APP_TOKEN) String token, @FieldMap Map<String, String> body);

    @GET("web/infoTask/joinVideoRoom")
    @FormUrlEncoded
    Call<BaseJson> joinVideoRoom(@Header(Constant.APP_TOKEN) String token, @Query("taskId")String taskId);

    @GET("api/safetyRecord/addVideoCase")
    Call<BaseJson> safetyAddVideoCase(@Header(Constant.APP_TOKEN) String token);

    /**
     * 视频报警挂断时通知服务器
     */
    @POST("api/hangup")
    @FormUrlEncoded
    Call<BaseJson> stopVideoCall(@Header(Constant.APP_TOKEN) String token, @Field("caseId") String caseId);

    /** 快速加入房间 */
    @Headers("Content-Type: application/json")
    @POST("api/fast/join")
    Call<BaseJson> joinRoom(@Header(Constant.APP_TOKEN) String token, @Body Map<String, String> body);

}
